package com.tanhua.server.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.server.mapper.QuestionMapper;
import com.tanhua.server.pojo.Question;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: cloudy
 * @Description:
 * @Date: Created in 21:45 2021/1/13
 * @ModifiedBy:
 */
@Service
public class QuestionService {

    @Autowired
    private QuestionMapper questionMapper;

    public Question queryQuestion(Long userId) {
        QueryWrapper<Question> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id",userId);
        return this.questionMapper.selectOne(queryWrapper);
    }

}
